/* Solana DApp Theme - Using Solana brand colors #9945FF and #14F195 */

:root {
  /* Solana Brand Colors */
  --solana-purple: #9945FF;
  --solana-green: #14F195;
  --solana-green-transparent: rgba(20, 241, 149, 0.3);
  --solana-purple-transparent: rgba(153, 69, 255, 0.3);
  /* Light Mode Colors */
  --sol-bg-primary: #ffffff;
  --sol-bg-primary-light: #fefefe;
  --sol-bg-secondary: #ededed;
  --sol-bg-tertiary: #e3e3e3;
  --sol-text-primary: #212529;
  --sol-text-secondary: #6c757d;
  --sol-text-muted: #adb5bd;
  --sol-border: #dee2e6;
  --sol-shadow: rgba(0, 0, 0, 0.1);

  /* Interactive Elements */
  --sol-primary: var(--solana-purple);
  --sol-primary-hover: #7c3aed;
  --sol-secondary: var(--solana-green);
  --sol-secondary-hover: #10b981;
  --sol-success: var(--solana-green);
  --sol-warning: #f59e0b;
  --sol-danger: #ef4444;

  /* Card & Component Colors */
  --sol-card-bg: var(--sol-bg-primary);
  --sol-card-border: var(--sol-border);
  --sol-navbar-bg: linear-gradient(135deg, var(--solana-purple), #7c3aed);
  --sol-navbar-text: #ffffff;
}

/* Dark Mode - System Preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sol-bg-primary: #000000;
    --sol-bg-primary-light: #070707;
    --sol-bg-secondary: #161b22;
    --sol-bg-tertiary: #21262d;
    --sol-text-primary: #f0f6fc;
    --sol-text-secondary: #8b949e;
    --sol-text-muted: #6e7681;
    --sol-border: #30363d;
    --sol-shadow: rgba(0, 0, 0, 0.3);

    /* Adjust colors for dark mode */
    --sol-primary-hover: #a855f7;
    --sol-secondary-hover: #14f195;
    --sol-card-bg: var(--sol-bg-secondary);
    --sol-card-border: var(--sol-border);
    --sol-navbar-bg: linear-gradient(135deg, #1a1a1a, #2d1b69);
  }
}

/* User Preference Overrides */
:root[data-theme="dark"] {
  --sol-bg-primary: #0d1117;
  --sol-bg-secondary: #161b22;
  --sol-bg-tertiary: #21262d;
  --sol-text-primary: #f0f6fc;
  --sol-text-secondary: #8b949e;
  --sol-text-muted: #6e7681;
  --sol-border: #30363d;
  --sol-shadow: rgba(0, 0, 0, 0.3);

  /* Adjust colors for dark mode */
  --sol-primary-hover: #a855f7;
  --sol-secondary-hover: #14f195;
  --sol-card-bg: var(--sol-bg-secondary);
  --sol-card-border: var(--sol-border);
  --sol-navbar-bg: linear-gradient(135deg, #1a1a1a, #2d1b69);
}

:root[data-theme="light"] {
  --sol-bg-primary: #ffffff;
  --sol-bg-secondary: #f8f9fa;
  --sol-bg-tertiary: #e9ecef;
  --sol-text-primary: #212529;
  --sol-text-secondary: #6c757d;
  --sol-text-muted: #adb5bd;
  --sol-border: #dee2e6;
  --sol-shadow: rgba(0, 0, 0, 0.1);

  /* Light mode interactive colors */
  --sol-primary-hover: #7c3aed;
  --sol-secondary-hover: #10b981;
  --sol-card-bg: var(--sol-bg-primary);
  --sol-card-border: var(--sol-border);
  --sol-navbar-bg: linear-gradient(135deg, var(--solana-purple), #7c3aed);
}

/* Modern CSS with light-dark() function fallback */
body {
  background-color: light-dark(var(--sol-bg-primary), #0d1117);
  color: light-dark(var(--sol-text-primary), #f0f6fc);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  cursor: pointer;
}

/* Fallback for browsers without light-dark() support */
@supports not (color: light-dark(white, black)) {
  body {
    background-color: var(--sol-bg-primary);
    color: var(--sol-text-primary);
  }
}

/* Navigation */
.navbar {
  background: var(--sol-navbar-bg) !important;
  border-bottom: 1px solid var(--solana-green);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sol-navbar-text) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--solana-green) !important;
}

/* modals */
.modal-content {
  background-color: var(--sol-bg-secondary);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  box-shadow: 0 4px 16px var(--sol-shadow);
  transition: all 0.3s ease;
}

.modal-header {
  background: linear-gradient(135deg, var(--sol-bg-secondary), var(--sol-bg-tertiary));
  border-bottom: 1px solid var(--sol-border);
  border-radius: 0 !important;
  font-weight: 600;
}

.modal-body {
  background-color: var(--sol-bg-secondary);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  box-shadow: 0 4px 16px var(--sol-shadow);
  transition: all 0.3s ease;
}

.modal-footer {
  background: linear-gradient(135deg, var(--sol-bg-secondary), var(--sol-bg-tertiary));
  border-top: 1px solid var(--sol-border);
  border-radius: 0 !important;
  font-weight: 600;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--solana-purple), #7c3aed);
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(153, 69, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--sol-primary-hover), #6d28d9);
  box-shadow: 0 6px 20px rgba(153, 69, 255, 0.4);
}

.btn-outline-light {
  border-color: var(--solana-green);
  color: var(--solana-green);
  font-weight: 500;
}

.btn-outline-light:hover {
  background-color: var(--solana-green);
  border-color: var(--solana-green);
  color: #000;
}

.btn-primary {
  background: linear-gradient(135deg, var(--solana-purple), #7c3aed);
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(153, 69, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-success {
  background: linear-gradient(135deg, var(--solana-green), var(--solana-purple));
  border: none;
  box-shadow: 0 4px 12px rgba(20, 241, 149, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: none;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border: none;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.hidden {
  display: none;
}

/* Cards */
.card {
  background-color: var(--sol-card-bg);
  border: 1px solid var(--sol-card-border);
  border-radius: 0;
  box-shadow: 0 4px 16px var(--sol-shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--sol-shadow);
}

.card-header {
  background: linear-gradient(135deg, var(--sol-bg-secondary), var(--sol-bg-tertiary));
  border-bottom: 1px solid var(--sol-border);
  border-radius: 0 !important;
  font-weight: 600;
}

.list-group-item {
  background-color: var(--sol-bg-secondary);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  color: var(--sol-text-primary);
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background-color: var(--sol-bg-tertiary);
  color: var(--sol-text-primary);
}

.list-group-item-action {
  color: var(--sol-text-primary);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background-color: var(--sol-bg-tertiary);
  color: var(--sol-text-primary);
}

.list-group-item.active {
  background-color: var(--solana-purple);
  border-color: var(--solana-purple);
  color: #ffffff;
}

/* Form Elements */
.form-control {
  background-color: var(--sol-bg-secondary);
  border: 2px solid var(--sol-border);
  border-radius: 3px;
  color: var(--sol-text-primary);
  transition: all 0.3s ease;
}

.btn {
  border-radius: 3px;
}

.form-control:focus {
  background-color: var(--sol-card-bg);
  border-color: var(--solana-purple);
  color: var(--sol-text-primary);
  box-shadow: none;
  outline: none;
}

.form-control.invalid {
  border-color: var(--sol-danger);
  background-color: rgba(239, 68, 68, 0.1);
}

.form-control.valid {
  border-color: var(--sol-success);
  background-color: rgba(20, 241, 149, 0.1);
}

.form-label {
  color: var(--sol-text-secondary);
  font-weight: 600;
}

/* 1. Make html and body full height and non-scrollable */
html:has(#thread-app-row),
body:has(#thread-app-row) {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.container:has(#thread-app-row) {
  min-height: 0;
}

/* OUTER FLEX: full viewport height */
#thread-app-row {
  height: calc(98vh - 48px);
  max-height: calc(98vh - 48px) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  min-height: 0;
}

/* MIDDLE FLEX: must fill the row's height */
#thread-app-col {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body:has(#thread-app-row) #walletModalOpener {
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 4px;
  padding-right: 4px;
  font-size: 0.7em;
}

body:has(#thread-app-row) .navbar {
  padding: 4px !important;
  font-size: 0.7em;
  max-height: 48px;
}

body:has(#thread-app-row) #main-logo {
  font-size: 1em;
}

body:has(#thread-app-row) .navbar-toggler {
  padding: 0.25rem 0.5rem;
  font-size: 0.7em;
}

/* minimize nav size */
body:has(#thread-app-row) #min-nav-row {
  display: flex;
  flex-direction: column;
  font-size: 0.7em;
}

body:has(#thread-app-row) #min-nav-row .col-md-8 {
  padding: 0.15rem;
}

body:has(#thread-app-row) #profileIconContainer {
  width: 24px !important;
  height: 24px !important;
}

body:has(#thread-app-row) #profileIcon {
  width: 24px !important;
  height: 24px !important;
}

body:has(#thread-app-row) .profile-initials {
  width: 24px !important;
  height: 24px !important;
  font-size: 0.7em !important;
}

.thread-container {
  flex: 0 0 auto;
  min-height: 0;
  background-color: var(--sol-bg-secondary);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  height: auto;
  overflow: visible;
  padding: 0.5rem;
}

.reply-container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 0.8em;
  background-color: var(--sol-bg-primary-light);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  padding: 0.5rem;
}

.composer-container {
  flex: 0 0 auto;
  min-height: 0;
  background-color: var(--sol-bg-secondary);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  padding: 0.5rem;
}

.thread-container::-webkit-scrollbar,
.reply-container::-webkit-scrollbar,
.composer-container::-webkit-scrollbar,
.emoji-grid::-webkit-scrollbar {
  width: 8px;
}

.thread-container::-webkit-scrollbar-track,
.reply-container::-webkit-scrollbar-track,
.composer-container::-webkit-scrollbar-track,
.emoji-grid::-webkit-scrollbar-track {
  background: var(--sol-bg-tertiary);
  border-radius: 2px;
}

.thread-container::-webkit-scrollbar-thumb,
.reply-container::-webkit-scrollbar-thumb,
.composer-container::-webkit-scrollbar-thumb,
.emoji-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--solana-purple), var(--solana-green));
  border-radius: 2px;
}

.thread-container::-webkit-scrollbar-thumb:hover,
.reply-container::-webkit-scrollbar-thumb:hover,
.composer-container::-webkit-scrollbar-thumb:hover,
.emoji-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--sol-primary-hover), var(--sol-secondary-hover));
}

/* Chat Components */
.chat {
  background-color: var(--sol-card-bg);
  position: relative;
  margin-left: none;
  margin-right: none;
  margin-top: 1px;
  margin-bottom: none;
  padding-top: 2px;
  padding-left: 4px;
  padding-right: 0;
  padding-bottom: 3px;
  border-top: 1px solid var(--sol-border);
  border-left: 4px solid var(--sol-border);
  border-right: 1px solid rgba(0, 0, 0, 0);
  border-bottom: 1px solid rgba(0, 0, 0, 0);
}

/* When .chat is inside of a .chat, boder-right needs to be none */
.chat .chat {
  border-right: none;
}

.chat:hover {
  border-top-color: var(--solana-purple);
  border-left-color: var(--solana-purple);
  border-right-color: var(--solana-purple);
  border-bottom-color: var(--solana-purple);
}

.chat.tip_chat {
  /* Use /static/images/sol.png as background image, full width */
  background: transparent url('/static/images/sol_right.png') center center / cover no-repeat;
  border-top-color: var(--solana-green);
  border-left-color: var(--solana-green);
}

.chat.tip_chat:hover {
  border-top-color: var(--solana-green);
  border-right-color: var(--solana-green);
  border-bottom-color: var(--solana-green);
}

.chat.highlighted {
  background: light-dark(linear-gradient(135deg, rgba(20, 241, 149, 0.05), rgba(153, 69, 255, 0.05)),
      linear-gradient(135deg, rgba(20, 241, 149, 0.1), rgba(153, 69, 255, 0.1)));
}

.follow-btn:not(.text-muted) {
  color: var(--solana-green);
  opacity: 0.8;
}

.reaction-container {
  min-height: 1.4em;
}

.reaction-container .badge {
  border: none !important;
  outline: none !important;
  padding: 3px;
  margin: 1px;
  background: rgba(125, 125, 125, 0.2) !important;
  color: var(--sol-text-muted);
  font-weight: 300;
  box-shadow: none !important;
}

.reaction-container button,
.reaction-container button:hover {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 3px;
  margin: 1px;
  font-size: 0.7em;
  opacity: 0.9;
  box-shadow: none !important;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* 12 equal columns */
  gap: 4px;
  /* space between emojis */
  justify-items: center;
  align-items: center;
  max-height: 40vh;
  overflow-y: auto;
}


.emoji-option {
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px;
  width: 2rem;
  height: 2rem;
  text-align: center;
}

.emoji-grid button {
  border: none !important;
  outline: none !important;
}

.has_alias {
  color: var(--solana-purple);
  font-weight: 600;
}

.no_alias {
  opacity: 0.7;
  color: var(--sol-text-muted);
  font-size: 0.8em;
}

/* Public Key Display */
.pubkey-short {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  color: var(--solana-purple);
  font-weight: 600;
  background: light-dark(rgba(153, 69, 255, 0.1),
      rgba(153, 69, 255, 0.2));
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Blur Content, blur=hidden by author, report=reported by current user, blocked=blocked by current user */
.blur,
.reported,
.blocked {
  opacity: 0.5;
  cursor: pointer;
}

.blur:hover,
.reported:hover,
.blocked:hover {
  opacity: 1;
}

.blur *,
.reported *,
.blocked * {
  filter: blur(4px);
  pointer-events: none;
  /* disable text selection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none
}

.blur {
  border: 2px dashed #eb1eeb !important;
}

.reported {
  border: 2px dashed rgb(255, 255, 0) !important;
}

.blocked {
  border: 2px dashed rgb(255, 100, 100) !important;
}

/* Alert Messages */
.alert-info {
  background: light-dark(linear-gradient(135deg, rgba(20, 241, 149, 0.1), rgba(153, 69, 255, 0.1)),
      linear-gradient(135deg, rgba(20, 241, 149, 0.15), rgba(153, 69, 255, 0.15)));
  border: 1px solid var(--solana-green);
  color: var(--sol-text-primary);
}

.alert-success {
  background: light-dark(rgba(20, 241, 149, 0.1), rgba(20, 241, 149, 0.15));
  border: 1px solid var(--solana-green);
  color: var(--sol-text-primary);
}

.alert-warning {
  background: light-dark(rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.15));
  border: 1px solid var(--sol-warning);
  color: var(--sol-text-primary);
}

.alert-danger {
  background: light-dark(rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.15));
  border: 1px solid var(--sol-danger);
  color: var(--sol-text-primary)
}

/* Responsive Design */
@media (max-width: 768px) {
  .card {
    margin-bottom: 1rem;
  }
}

/* Animation Utilities */
@keyframes solana-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(153, 69, 255, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(153, 69, 255, 0);
  }
}

.solana-pulse {
  animation: solana-pulse 2s infinite;
}

/* Gradient Text Utility */
.text-gradient {
  background: linear-gradient(135deg, var(--solana-purple), var(--solana-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.reverse-text-gradient {
  background: linear-gradient(135deg, var(--solana-green), var(--solana-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Loading Spinner */
.spinner-solana {
  border: 3px solid var(--sol-border);
  border-top: 3px solid var(--solana-purple);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.action-btn {
  /* usually contains a bootstrap icon (svg) */
  cursor: pointer;
  color: var(--solana-purple) !important;
  padding-left: 4px;
  padding-right: 4px;
}

.action-btn:hover {
  color: var(--solana-green) !important
}


/* Reply/Composer Form */
#reply_content {
  font-size: 0.8em;
  max-width: 50%;
  min-width: 37.5%;
  outline: none;
}

#tip_amount {
  max-width: 37.5%;
  min-width: 37.5%;
  outline: none;
}

.tip_pill {
  margin-right: 10px;
}

#reset_form_btn,
#send_btn {
  line-height: 0.7em;
  max-width: 12.5%;
  text-align: center !important;
  padding: 3px !important;
}

.thread-link-toggle {
  text-decoration: none;
}

.rounded-pill a {
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

.rounded-pill a:hover {
  color: white;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 900;
}

#main-logo {
  background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#main-logo:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(153, 69, 255, 0.5);
}

#walletContainer {
  opacity: 0;
}

#walletModalOpener {
  border-radius: 5px !important;
}

#disconnectBtnMini {
  border-radius: 5px !important;
  display: none;
  max-width: 2em;
  padding: 2px;
  text-align: center;
  font-size: 0.8em;
  margin-left: 3px;
  margin-right: 3px;
}

/* Navbar z-index fix - ensure navbar appears above cards and other content */
.navbar {
  z-index: 1030;
  position: relative;
}

.navbar-collapse {
  z-index: 1030;
}

/* Mobile: Right-align nav items for easier thumb access */
@media (max-width: 991.98px) {
  .navbar-nav {
    text-align: right;
  }

  .navbar-nav .nav-item {
    text-align: right;
  }
}

.home-override {
  font-size: 1.2em;
  font-weight: 600;
  text-shadow: 4px 5px 3px rgba(0, 0, 0, 0.95);
}

#wallet-container button {
  border-radius: 0 0 0 0 !important;
}

.nav-link.disabled {
  pointer-events: none;
  cursor: default;
  color: #6c757d !important;
  opacity: 0.6;
}

#tip_tracker {
  overflow: hidden;
  height: 1.2em;
  font-size: 0.8em;
  line-height: 1em;
  color: var(--sol-text-muted);
  border-radius: 0.6em;
}

#tips_to_author_bar {
  background-color: var(--solana-green-transparent);
  border-radius: 0;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

#tips_to_others_bar {
  background-color: var(--solana-purple-transparent);
  border-radius: 0;
  display: block;
  position: absolute;
  top: 0;
  left: 100%;
  height: 100%;
  width: 100%;
}

.content_link {
  text-decoration: none;
  color: var(--sol-text-primary);
}

#new_message_dismiss {
  color: var(--solana-green);
  font-weight: 300;
  font-size: 0.8em;
  opacity: 0.8;
  cursor: pointer;
  text-decoration: none;
}

/* Profile Dropdown Styling */
#profileDropdown {
  padding: 0 !important;
  margin-left: 0.5rem;
}

#profileIconContainer {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#profileIconContainer:hover {
  transform: scale(1.05);
}

#profileIcon {
  border: 1px solid var(--solana-green);
  transition: border-color 0.3s ease;
}

#profileDropdown:hover #profileIcon {
  border-color: var(--solana-purple);
}

.profile-initials {
  font-weight: 600;
  border: 2px solid var(--solana-green);
  transition: border-color 0.3s ease;
}

#profileDropdown:hover .profile-initials {
  border-color: var(--solana-purple);
}

.dropdown-menu {
  background-color: var(--sol-bg-secondary);
  border: 1px solid var(--sol-border);
  border-radius: 0;
  box-shadow: 0 4px 16px var(--sol-shadow);
  min-width: 200px;
}

.dropdown-item {
  color: var(--sol-text-primary);
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
}

.dropdown-item:hover:not(.disabled) {
  background-color: var(--sol-bg-tertiary);
  color: var(--sol-text-primary);
}

.dropdown-item.disabled {
  color: var(--sol-text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.dropdown-item:active:not(.disabled) {
  background-color: var(--solana-purple);
  color: #ffffff;
}

.dropdown-divider {
  border-color: var(--sol-border);
}

#chat-options-drowdown {
  display: none;
  margin: 6px;
  border: 1px solid var(--sol-border);
  border-radius: 6px;
  /* container radius */
  overflow: hidden;
  /* ensures child button borders don't poke out */
}

/* remove radius from all buttons */
#chat-options-drowdown button {
  border: 1px solid var(--sol-border);
  border-radius: 0;
  width: 100%;
  display: block;
}

/* first button: round top corners */
#chat-options-drowdown button:first-child {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

/* last button: round bottom corners */
#chat-options-drowdown button:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* ============================================
   POLL STYLES - Compact Overlay Design
   ============================================ */

.poll-container {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-top: 8px;
  padding-left: 7px;
  padding-right: 7px;
  padding-bottom: 4px;
  background-color: var(--sol-bg-primary-light);
  border: 1px solid var(--sol-border);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.poll-container.poll-active {
  border-top: none;
  border-left: 5px solid var(--solana-purple);
  border-right: 5px solid var(--solana-purple);
  border-bottom: none;
}

.poll-question {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--sol-text-primary);
  margin-bottom: 0.5rem;
}

.poll-style-overlay-compact .poll-option {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  min-height: 24px;
  max-height: 24px;
  margin-bottom: 4px;
  background-color: var(--sol-card-bg);
  transition: all 0.2s ease;
}

.poll-style-overlay-compact .poll-option:last-of-type {
  margin-bottom: 0.5rem;
}

.poll-style-overlay-compact .poll-option.clickable {
  cursor: pointer;
}

.poll-style-overlay-compact .poll-option .poll-option-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--solana-purple), var(--solana-green));
  transition: width 0.5s ease;
  opacity: 0.7;
}

.poll-style-overlay-compact .poll-option-overlay-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 4px;
  padding-right: 4px;
  pointer-events: none;
}

.poll-style-overlay-compact .poll-option-text {
  font-weight: 600;
  font-size: 0.7em;
  color: var(--sol-text-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.poll-style-overlay-compact .poll-option-votes {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--sol-text-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.poll-style-overlay-compact .poll-option.clickable:hover {
  border-color: var(--solana-purple);
  transform: translateX(2px);
  box-shadow: 0 2px 8px var(--sol-shadow);
}

.poll-style-overlay-compact .poll-option.voted {
  border-color: var(--solana-green);
  box-shadow: 0 0 0 2px var(--solana-green-transparent);
}

.poll-style-overlay-compact .poll-footer {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  font-size: 0.8em;
}

.poll-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.5em;
  line-height: 0.7em;
  padding-left: 6px;
  padding-right: 6px;
  color: var(--sol-text-muted);
  opacity: 0.8;
}

.poll-total-votes,
.poll-status {
  color: var(--sol-text-secondary);
}

/* ============================================
   CARD COMPACT MODIFIER - For Home Page Cards
   ============================================ */

.poll-card-compact .poll-question {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.poll-card-compact .poll-option {
  min-height: 20px;
  margin-bottom: 7px;
  border-width: 1.5px;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 4px;
  padding-right: 4px;
  font-size: 0.8em;
}

.poll-card-compact .poll-option:last-of-type {
  margin-bottom: 0.4rem;
}

.poll-card-compact .poll-option-text {
  font-size: 0.8em;
  font-weight: 600;
}

.poll-card-compact .poll-option-votes {
  font-size: 0.7em;
}

.poll-card-compact .poll-footer {
  margin-top: 2px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 0.5em;
}

.poll-card-compact .poll-option.clickable:hover {
  transform: translateX(1px);
}

/* ============================================
   HIDDEN RESULTS UNTIL VOTE FEATURE
   ============================================ */

.poll-hide-results .poll-option-bar-fill {
  display: none !important;
}

.poll-hide-results .poll-option-votes {
  display: none !important;
}

.poll-show-results .poll-option-bar-fill {
  display: block !important;
  animation: fillBar 0.8s ease-out;
}

.poll-show-results .poll-option-votes {
  display: inline !important;
}

@keyframes fillBar {
  from {
    width: 0%;
  }
}

.poll-option-bar-fill {
  animation: fillBar 0.8s ease-out;
}

.wallet-btn-group {
  margin-top: -1px;
}

.wallet-btn-group button,
.wallet-btn-group a {
  border-radius: 0;
  border-width: 1px !important;
}

/* First button/a in first wallet group */
.wallet-btn-group:first-child button:first-child,
.wallet-btn-group:first-child a:first-child {
  border-top-left-radius: 10px;
}

/* Last button/a in the first wallet group */
.wallet-btn-group:first-child button:last-child,
.wallet-btn-group:first-child a:last-child {
  border-top-right-radius: 10px;
}

/* First button/a in the last wallet group */
.last-wallet-btn-group button:first-child,
.last-wallet-btn-group a:first-child {
  border-bottom-left-radius: 10px;
}

/* Last button/a in the last wallet group */
.last-wallet-btn-group button:last-child,
.last-wallet-btn-group a:last-child {
  border-bottom-right-radius: 10px;
}

.all_corners_rounded button:first-child,
.all_corners_rounded a:first-child {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
}

.all_corners_rounded button:last-child,
.all_corners_rounded a:last-child {
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
}

.disabled_wallet {
  opacity: 0.5;
  cursor: not-allowed;
}